package com.lr.springbootdemo.bean;

import com.lr.springbootdemo.util.JsonUtil;

import java.io.Serializable;

/**
 * .返回包装
 * Created by li.rui on 2016/6/12.
 */
public class Result implements Serializable{
    private static final long serialVersionUID = -7906884739304046472L;

    private Object data;
    private String msg = "";
    /**0：失败，1：成功*/
    private Integer status = Constants.SUCCESS;

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return JsonUtil.object2String(this);
    }
}
